package com.whj.servicemap.controller;

import com.whj.internalcommon.dto.ResponseResult;
import com.whj.servicemap.service.ServiceMapService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: wanghaijun
 * @Date: 2023/1/16 - 01 - 16 - 14:11 
 * @Description: com.whj.servicemap.controller
 */

@RestController
@RequestMapping("/service")
public class ServiceController {

    @Autowired
    private ServiceMapService serviceMapService;

    /**
     * 创建服务
     *
     * @param name
     * @return
     */
    @PostMapping("/add")
    public ResponseResult add(String name) {
        return serviceMapService.add(name);
    }
}
